`include "NewLabel_testbench.sv"

// Base Test
class NewLabel_base_test extends ovm_test;

	`ovm_component_utils(NewLabel_base_test)
	NewLabel_tb NewLabel_tb0;
	
	ovm_table_printer printer;
	
	function new(string name = "NewLabel_base_test", ovm_component parent=null);
		super.new(name,parent);
	endfunction : new

	virtual function void build();
		super.build();
    	set_config_int("*", "run_delay", 6ns);
    	//set_config_int("*.bus_seqr", "count", 200);
        
    	// Enable transaction recording for everything
    	set_config_int("*", "recording_detail", OVM_FULL);

		// Create the tb
		NewLabel_tb0 = NewLabel_tb::type_id::create("NewLabel_tb0", this);
		// Create a specific depth printer for printing the created topology
		printer = new();
		printer.knobs.depth = 5;
	endfunction : build

	function void end_of_elaboration();
		// Set verbosity
		ovm_top.set_report_verbosity_level_hier(OVM_FULL);
		`ovm_info(get_type_name(), $psprintf("Printing the test topology :\n%s", this.sprint(printer)), OVM_LOW)
		ovm_report_info(get_type_name(), $psprintf("%d verbosity_level", this.get_report_verbosity_level()), OVM_NONE);
	endfunction : end_of_elaboration

	virtual function void start_of_simulation();
		//set_report_id_action_hier(CFGOVR, OVM_DISPLAY);
		//set_report_id_action_hier(CFGSET, OVM_DISPLAY);
		check_config_usage(1);
		print_config_matches = 1;
		print_config_settings("",null,1);
		//set a drain-time for the environment if desired
		ovm_test_done.set_drain_time(this, 500000);
		`ovm_info(get_type_name(), $psprintf("%t drain_time", ovm_test_done.get_drain_time(this)), OVM_MEDIUM);
	endfunction : start_of_simulation
	
	task run();
		
	endtask : run
	
endclass : NewLabel_base_test

///////////////////////////////////////////////////////////////////////////////
//						ALL YOU WANT TO TEST ADD HERE!!!
///////////////////////////////////////////////////////////////////////////////
// 
class test_NewLabel_16X16_Special extends NewLabel_base_test;

	`ovm_component_utils(test_NewLabel_16X16_Special)

	function new(string name = "test_NewLabel_16X16_Special", ovm_component parent=null);
		super.new(name,parent);
	endfunction : new

	virtual function void build();
		// Create the tb
		super.build();
		// Set the default sequence
    	set_config_string("*.sysif_seqr", "default_sequence", "work_seq");
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_width", 'd16);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_height", 'd16);
    	//set_config_int("*.sysif_seqr", "sysif_config_seq.extract_mode", 'b011);	//for HYPER
    	//set_config_int("*.sysif_seqr", "sysif_config_seq.label_mode", 'b00);	//Shut Down Label Engine
    	set_config_int("*.sysif_seqr", "sysif_config_seq.extract_mode", 'b001);	//for LINE
    	set_config_int("*.sysif_seqr", "sysif_config_seq.label_mode", 'b01);	//for LINE Label Engine
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_en", 'b1);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_trigger_depth", 'h10);
    	set_config_string("*.sysif_seqr", "Special_16X16_seq.filename", "./testImg/srcImage_16x16_20.txt");
    	set_config_string("*.sysif_seqr", "Special_16X16_seq.filename2", "./testImg/srcImage_16x16_20_result.txt");


    	//set_config_int("*.sysif_config_seq", "aux_trigger_depth", 'd10);
    	//set_config_int("*.trp_seqr", "NewLabel_trp_fixed_write_seq.itr", 36);
	endfunction : build
	
endclass

class test_NewLabel_128X128_Special extends NewLabel_base_test;

	`ovm_component_utils(test_NewLabel_128X128_Special)

	function new(string name = "test_NewLabel_128X128_Special", ovm_component parent=null);
		super.new(name,parent);
	endfunction : new

	virtual function void build();
		// Create the tb
		super.build();
		// Set the default sequence
    	set_config_string("*.sysif_seqr", "default_sequence", "work_seq");
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_width", 'd128);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_height", 'd128);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_en", 'b1);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_trigger_depth", 'd128);
    	set_config_string("*.sysif_seqr", "Special_128X128_seq.filename", "./testImg/srcImage_128x128_50.txt");
    	set_config_string("*.sysif_seqr", "Special_128X128_seq.filename2", "./testImg/srcImage_128x128_50_result.txt");


    	//set_config_int("*.sysif_config_seq", "aux_trigger_depth", 'd10);
    	//set_config_int("*.trp_seqr", "NewLabel_trp_fixed_write_seq.itr", 36);
	endfunction : build
	
endclass

class test_NewLabel_256X256_Special extends NewLabel_base_test;

	`ovm_component_utils(test_NewLabel_256X256_Special)

	function new(string name = "test_NewLabel_256X256_Special", ovm_component parent=null);
		super.new(name,parent);
	endfunction : new

	virtual function void build();
		// Create the tb
		super.build();
		set_config_int("*", "recording_detail", OVM_FULL);
		// Set the default sequence
    	set_config_string("*.sysif_seqr", "default_sequence", "work_seq");
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_width", 'd256);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_height", 'd256);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_en", 'b1);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_trigger_depth", 'd256);
    	set_config_string("*.sysif_seqr", "Special_256X256_seq.filename", "./testImg/srcImage_256x256_50.txt");
    	set_config_string("*.sysif_seqr", "Special_256X256_seq.filename2", "./testImg/srcImage_256x256_50_result.txt");


    	//set_config_int("*.sysif_config_seq", "aux_trigger_depth", 'd10);
    	//set_config_int("*.trp_seqr", "NewLabel_trp_fixed_write_seq.itr", 36);
	endfunction : build
	
endclass

class test_NewLabel_512X512_Special extends NewLabel_base_test;

	`ovm_component_utils(test_NewLabel_512X512_Special)

	function new(string name = "test_NewLabel_512X512_Special", ovm_component parent=null);
		super.new(name,parent);
	endfunction : new

	virtual function void build();
		// Create the tb
		super.build();
		set_config_int("*", "recording_detail", OVM_FULL);
		// Set the default sequence
    	set_config_string("*.sysif_seqr", "default_sequence", "work_seq");
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_width", 'd512);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.img_height", 'd512);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_en", 'b1);
    	set_config_int("*.sysif_seqr", "sysif_config_seq.aux_trigger_depth", 'd512);
    	set_config_string("*.sysif_seqr", "Special_512X512_seq.filename", "./testImg/srcImage_512x512_60.txt");
    	set_config_string("*.sysif_seqr", "Special_512X512_seq.filename2", "./testImg/srcImage_512x512_60_result.txt");


    	//set_config_int("*.sysif_config_seq", "aux_trigger_depth", 'd10);
    	//set_config_int("*.trp_seqr", "NewLabel_trp_fixed_write_seq.itr", 36);
	endfunction : build
	
endclass